<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="attendance.aspx.cs" Inherits="student_attendance" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxToolKit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>School - Time Table Detail</title>

    <script src="../include/js/form.js" type="text/javascript"></script>

    <style type="text/css">
        .wrap
        {
            /*
            white-space: normal;
            width: 100px;
            text-align:center;*/
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="bodyContentTop" runat="Server">
    <h1>
        Student Attendance Daily</h1>
    <h3>
        Taking student attendance list.</h3>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="bodyContent" runat="Server">
    <div id="Div1" runat="server" visible="false">
        TimeTableKey:<asp:Label runat="server" Text="-1" ID="lblTimeTableKey" /><br />
        SchoolKey:<asp:Label runat="server" Text="-1" ID="lblSchoolKey" /><br />
        LocationKey:<asp:Label runat="server" Text="-1" ID="lblLocationKey" /><br />
        SchoolMajorKey:<asp:Label runat="server" Text="-1" ID="lblSchoolMajorKey" /><br />
        StandardLevelKey:<asp:Label runat="server" Text="-1" ID="lblStandardLevelKey" /><br />
        EduPreiodKey:<asp:Label runat="server" Text="-1" ID="lblEduPeriodKey" /><br />
        BreakTime1Duration:<asp:Label runat="server" Text="0" ID="lblBreakTime1DurationHour" /><asp:Label
            runat="server" Text="0" ID="lblBreakTime1DurationMin" /><br />
        BreakTime2Duration:<asp:Label runat="server" Text="-1" ID="lblBreakTime2DurationHour" /><asp:Label
            runat="server" Text="0" ID="lblBreakTime2DurationMin" /><br />
        BreakTime3Duration:<asp:Label runat="server" Text="-1" ID="lblBreakTime3DurationHour" /><asp:Label
            runat="server" Text="0" ID="lblBreakTime3DurationMin" /><br />
        BreakTime4Duration:<asp:Label runat="server" Text="-1" ID="lblBreakTime4DurationHour" /><asp:Label
            runat="server" Text="0" ID="lblBreakTime4DurationMin" /><br />
        BreakTime5Duration:<asp:Label runat="server" Text="-1" ID="lblBreakTime5DurationHour" /><asp:Label
            runat="server" Text="0" ID="lblBreakTime5DurationMin" /><br />
        BreakTime6Duration:<asp:Label runat="server" Text="-1" ID="lblBreakTime6DurationHour" /><asp:Label
            runat="server" Text="0" ID="lblBreakTime6DurationMin" /><br />
        BreakTime7Duration:<asp:Label runat="server" Text="-1" ID="lblBreakTime7DurationHour" /><asp:Label
            runat="server" Text="0" ID="lblBreakTime7DurationMin" /><br />
        BreakTime8Duration:<asp:Label runat="server" Text="-1" ID="lblBreakTime8DurationHour" /><asp:Label
            runat="server" Text="0" ID="lblBreakTime8DurationMin" /><br />
        BreakTime9Duration:<asp:Label runat="server" Text="-1" ID="lblBreakTime9DurationHour" /><asp:Label
            runat="server" Text="0" ID="lblBreakTime9DurationMin" /><br />
        BreakTime10Duration:<asp:Label runat="server" Text="-1" ID="lblBreakTime10DurationHour" /><asp:Label
            runat="server" Text="0" ID="lblBreakTime10DurationMin" /><br />
    </div>
    <div class="elements_inner_wrapper">
        <div id="contentBody">
            <div class="section">
                <div class="seperator">
                </div>
                <fieldset class="formouter">
                    <table cellpadding="3" cellspacing="3" width="100%">
                        <tr>
                            <td colspan="2">
                                <table cellpadding="5" cellspacing="5">
                                    <tr>
                                        <td style="font-weight: bold">
                                            School
                                        </td>
                                        <td>
                                            :
                                        </td>
                                        <td>
                                            <asp:Label runat="server" ID="lblSchoolName" />
                                        </td>
                                        <td style="font-weight: bold">
                                            Period
                                        </td>
                                        <td>
                                            :
                                        </td>
                                        <td>
                                            <asp:Label runat="server" ID="lblPeriodDesc" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="font-weight: bold">
                                            Major
                                        </td>
                                        <td>
                                            :
                                        </td>
                                        <td>
                                            <asp:Label runat="server" ID="lblMajor" />
                                        </td>
                                        <td style="font-weight: bold">
                                            Duration
                                        </td>
                                        <td>
                                            :
                                        </td>
                                        <td>
                                            <asp:Label runat="server" ID="lblPeriodDuration" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="font-weight: bold">
                                            Standard Level
                                        </td>
                                        <td>
                                            :
                                        </td>
                                        <td>
                                            <asp:Label runat="server" ID="lblStandardLevel" />
                                        </td>
                                        <td style="font-weight: bold">
                                            Location
                                        </td>
                                        <td>
                                            :
                                        </td>
                                        <td>
                                            <asp:Label runat="server" ID="lblLocation" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="font-weight: bold">
                                            Day Group
                                        </td>
                                        <td>
                                            :
                                        </td>
                                        <td>
                                            <asp:Label runat="server" ID="lblDayGroupDesc" />
                                            <asp:Label runat="server" ID="lblDayDecriptionList" Visible="false" />
                                        </td>
                                        <td style="font-weight: bold">
                                            Start Time
                                        </td>
                                        <td>
                                            :
                                        </td>
                                        <td>
                                            <asp:Label runat="server" ID="lblStartTime" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="font-weight: bold">
                                            Section Duration
                                        </td>
                                        <td>
                                            :
                                        </td>
                                        <td>
                                            <asp:Label runat="server" ID="lblSectionDuration" />
                                        </td>
                                        <td style="font-weight: bold">
                                            No. Of Section
                                        </td>
                                        <td>
                                            :
                                        </td>
                                        <td>
                                            <asp:Label runat="server" ID="lblNoOfSection" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="font-weight: bold">
                                            Break Time
                                        </td>
                                        <td>
                                            :
                                        </td>
                                        <td>
                                            <asp:Label runat="server" ID="lblBreakTimeDesc" />
                                            <asp:Label runat="server" ID="lblBreakTimeCount" />
                                        </td>
                                        <td style="font-weight: bold">
                                            Date/Time
                                        </td>
                                        <td>
                                            :
                                        </td>
                                        <td>
                                            <asp:Label runat="server" ID="lblModifiedDateTime" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="6">
                                            <asp:Button runat="server" ID="btnBackToTimeTableSetup" Text="Back to Timetable Setup"
                                                OnClick="btnBackToTimeTableSetup_Click" />
                                            <asp:Button runat="server" ID="btnUpdateTimeTableDetails" Text="Update Timetable Details" OnClick="btnUpdateTimeTableDetails_Click" />
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:UpdatePanel runat="server" ID="uplClassRoom">
                                    <ContentTemplate>
                                        <div class="row_curved" id="divClassRoom" runat="server">
                                            <label>
                                                <asp:Label ID="Label4" Text="Class Room" runat="server"></asp:Label></label>
                                            <div class="field">
                                                <span class="indicator">
                                                    <asp:DropDownList ID="ddlClassRoom" runat="server" DataSourceID="sqlDSClassRoom"
                                                        DataTextField="ClassRoomDesc" DataValueField="ClassRoomKey" AutoPostBack="True"
                                                        OnSelectedIndexChanged="ddlClassRoom_SelectedIndexChanged" />
                                                    <asp:SqlDataSource ID="sqlDSClassRoom" runat="server" ConnectionString="<%$ ConnectionStrings:sis.dbconn %>"
                                                        SelectCommand="sprocClassRoomTableSelectListView" SelectCommandType="StoredProcedure">
                                                        <SelectParameters>
                                                            <asp:ControlParameter ControlID="lblSchoolKey" Name="SchoolKey" PropertyName="Text"
                                                                Type="Int32" />
                                                            <asp:ControlParameter ControlID="lblLocationKey" Name="LocationKey" PropertyName="Text"
                                                                Type="Int32" />
                                                        </SelectParameters>
                                                    </asp:SqlDataSource>
                                                </span>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                        <div class="row_curved" id="divAttDate" runat="server">
                                            <label>
                                                <asp:Label ID="Label5" Text="Att: Date" runat="server"></asp:Label></label>
                                            <div class="field">
                                                <span class="indicator">
                                                    <asp:DropDownList ID="ddlAttDate" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlAttDate_SelectedIndexChanged" />
                                                    <asp:Label runat="server" ID="lblAttDateDayName" /><br />
                                                    <asp:Button runat="server" ID="btnPreviousAttDate" Width="80px" Text="Previous" OnClick="btnPreviousAttDate_Click" />
                                                    <asp:Button runat="server" ID="btnTodayAttDate" Width="80px" Text="Today" OnClick="btnTodayAttDate_Click" />
                                                    <asp:Button runat="server" ID="btnNextAttDate" Width="80px" Text="Next" OnClick="btnNextAttDate_Click" />
                                                </span>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                                <br />
                                <b>Time Schedule Details</b>
                                <br />
                                <asp:UpdatePanel runat="server" ID="UpdatePanel1">
                                    <ContentTemplate>
                                        <asp:GridView ID="gvTimeTableDetails" runat="server" AutoGenerateColumns="False"
                                            DataKeyNames="StartTimeAndDay" CellPadding="1" Width="800px" ForeColor="#333333"
                                            BorderStyle="Solid" BorderWidth="1px" CaptionAlign="Top" OnRowDataBound="gvTimeTableDetails_RowDataBound"
                                            OnRowCommand="gvTimeTableDetails_RowCommand">
                                            <RowStyle BackColor="#EFF3FB" Height="35px" HorizontalAlign="Center" />
                                            <Columns>
                                                <asp:BoundField DataField="StartTimeAndDay" HeaderText="Start Time/Day" InsertVisible="False"
                                                    SortExpression="StartTimeAndDay" Visible="true" ItemStyle-Width="180px">
                                                    <ItemStyle Width="180px" />
                                                </asp:BoundField>
                                                <asp:TemplateField HeaderText="Monday" Visible="false" ItemStyle-Width="120px">
                                                    <ItemTemplate>
                                                        <asp:HyperLink ID="hplMonday" runat="server" Visible="false" />
                                                        <asp:LinkButton ID="btnMonday" Text="Update" CssClass="wrap" runat="server" />
                                                    </ItemTemplate>
                                                    <ItemStyle Width="120px" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Tuesday" Visible="false" ItemStyle-Width="120px">
                                                    <ItemTemplate>
                                                        <asp:HyperLink ID="hplTuesday" runat="server" Visible="false" />
                                                        <asp:LinkButton ID="btnTuesday" Text="Update" CssClass="wrap" runat="server" />
                                                    </ItemTemplate>
                                                    <ItemStyle Width="120px" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Wednesday" Visible="false" ItemStyle-Width="120px">
                                                    <ItemTemplate>
                                                        <asp:HyperLink ID="hplWednesday" runat="server" Visible="false" />
                                                        <asp:LinkButton ID="btnWednesday" Text="Update" CssClass="wrap" runat="server" />
                                                    </ItemTemplate>
                                                    <ItemStyle Width="120px" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Thursday" Visible="false" ItemStyle-Width="120px">
                                                    <ItemTemplate>
                                                        <asp:HyperLink ID="hplThursday" runat="server" Visible="false" />
                                                        <asp:LinkButton ID="btnThursday" Text="Update" CssClass="wrap" runat="server" />
                                                    </ItemTemplate>
                                                    <ItemStyle Width="120px" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Friday" Visible="false" ItemStyle-Width="120px">
                                                    <ItemTemplate>
                                                        <asp:HyperLink ID="hplFriday" runat="server" Visible="false" />
                                                        <asp:LinkButton ID="btnFriday" Text="Update" CssClass="wrap" runat="server" />
                                                    </ItemTemplate>
                                                    <ItemStyle Width="120px" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Saturday" Visible="false" ItemStyle-Width="120px">
                                                    <ItemTemplate>
                                                        <asp:HyperLink ID="hplSaturday" runat="server" Visible="false" />
                                                        <asp:LinkButton ID="btnSaturday" Text="Update" CssClass="wrap" runat="server" />
                                                    </ItemTemplate>
                                                    <ItemStyle Width="120px" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Sunday" Visible="false" ItemStyle-Width="120px">
                                                    <ItemTemplate>
                                                        <asp:HyperLink ID="hplSunday" runat="server" Visible="false" />
                                                        <asp:LinkButton ID="btnSunday" Text="Update" CssClass="wrap" runat="server" />
                                                    </ItemTemplate>
                                                    <ItemStyle Width="120px" />
                                                </asp:TemplateField>
                                            </Columns>
                                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                            <EmptyDataTemplate>
                                                Please add new timetable.
                                            </EmptyDataTemplate>
                                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                            <EditRowStyle BackColor="#2461BF" />
                                            <AlternatingRowStyle BackColor="White" />
                                        </asp:GridView>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:UpdatePanel runat="server" ID="uplDetails">
                                    <ContentTemplate>
                                        <div id="divTimeTableDetails" runat="server" visible="false">
                                            <asp:Label runat="server" ID="lblTimeTableDetailKey" Text="-1" />
                                            <asp:Label runat="server" ID="lblStudentProfileKey" Text="-1" />
                                            <asp:Label runat="server" ID="lblAttKey" Text="-1" />
                                            <asp:Label runat="server" ID="lblAttDetailKey" Text="-1" />
                                            <asp:Label runat="server" ID="lblLastSelectedLinkButtonID" Text="-1" />
                                        </div>
                                        <div class="row_curved" id="div2" runat="server">
                                            <label>
                                                &nbsp;</label>
                                            <div class="field">
                                                <span class="indicator">
                                                    <asp:Label ID="lblTopMessage" Font-Bold="true" runat="server"></asp:Label>
                                                </span>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                        <div class="row_curved" id="divDayCode" runat="server">
                                            <label>
                                                <asp:Label ID="Label1" Text="Day Name" runat="server"></asp:Label></label>
                                            <div class="field">
                                                <span class="indicator">
                                                    <asp:DropDownList ID="ddlDayCode" Enabled="false" runat="server" AutoPostBack="True"
                                                        OnSelectedIndexChanged="ddlDayCode_SelectedIndexChanged" />
                                                </span>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                        <div class="row_curved" id="divDetailStartTime" runat="server">
                                            <label>
                                                <asp:Label ID="lblDetailStartTime" Text="Time" runat="server"></asp:Label></label>
                                            <div class="field">
                                                <span class="indicator">
                                                    <asp:DropDownList ID="ddlTimeDesc" Enabled="false" runat="server" AutoPostBack="True"
                                                        OnSelectedIndexChanged="ddlTimeDesc_SelectedIndexChanged" />
                                                    <asp:DropDownList ID="ddlStartTime" runat="server" Visible="false" />
                                                    <asp:DropDownList ID="ddlEndTime" runat="server" Visible="false" />
                                                </span>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                        <div class="row_curved" id="divSubject" runat="server">
                                            <label>
                                                <asp:Label ID="Label2" Text="Subject" runat="server"></asp:Label></label>
                                            <div class="field">
                                                <span class="indicator">
                                                    <asp:DropDownList ID="ddlSubjectName" Enabled="false" runat="server" AutoPostBack="True"
                                                        DataSourceID="sqlDSSubject" DataTextField="SubjectName" DataValueField="SubjectKey" />
                                                    <asp:SqlDataSource ID="sqlDSSubject" runat="server" ConnectionString="<%$ ConnectionStrings:sis.dbconn %>"
                                                        SelectCommand="sprocSubjectTableSelectList" SelectCommandType="StoredProcedure">
                                                        <SelectParameters>
                                                            <asp:ControlParameter ControlID="lblSchoolKey" Name="SchoolKey" PropertyName="Text"
                                                                Type="Int32" />
                                                            <asp:ControlParameter ControlID="lblSchoolMajorKey" Name="SchoolMajorKey" PropertyName="Text"
                                                                Type="Int32" />
                                                            <asp:ControlParameter ControlID="lblStandardLevelKey" Name="StandardLevelKey" PropertyName="Text"
                                                                Type="Int32" />
                                                        </SelectParameters>
                                                    </asp:SqlDataSource>
                                                </span>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                        <div class="row_curved" id="dibTeacher" runat="server">
                                            <label>
                                                <asp:Label ID="Label3" Text="Teacher" runat="server"></asp:Label></label>
                                            <div class="field">
                                                <span class="indicator">
                                                    <asp:DropDownList ID="ddlTeacherName" Enabled="false" runat="server" DataSourceID="sqlDSTeacher"
                                                        DataTextField="TeacherFullName" DataValueField="TeacherProfileKey" />
                                                    <asp:SqlDataSource ID="sqlDSTeacher" runat="server" ConnectionString="<%$ ConnectionStrings:sis.dbconn %>"
                                                        SelectCommand="sprocTeacherSubjectTableSelectListViewBySubjectKey" SelectCommandType="StoredProcedure">
                                                        <SelectParameters>
                                                            <asp:ControlParameter ControlID="ddlSubjectName" Name="SubjectKey" PropertyName="SelectedValue"
                                                                Type="Int32" />
                                                        </SelectParameters>
                                                    </asp:SqlDataSource>
                                                </span>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                        <div class="row_curved" id="divOption" runat="server">
                                            <label>
                                                Default Att: Type</label>
                                            <div class="field">
                                                <span class="indicator">
                                                    <%--<asp:DropDownList ID="ddlOptions" runat="server">
                                                        <asp:ListItem Text="Update Absent List" Value="1" />
                                                        <asp:ListItem Text="Update Attend List" Value="2" />
                                                    </asp:DropDownList>--%>
                                                    <asp:DropDownList ID="ddlDefaultAttType" runat="server" DataSourceID="sqlDSAttType"
                                                        DataTextField="Description" DataValueField="AttendanceTypeCode" />
                                                    <asp:SqlDataSource ID="sqlDSDefaultAttType" runat="server" ConnectionString="<%$ ConnectionStrings:sis.dbconn %>"
                                                        SelectCommand="sprocStudentAttendanceTypeSelectList" SelectCommandType="StoredProcedure">
                                                    </asp:SqlDataSource>
                                                    <br />
                                                    <asp:CheckBox ID="chkUpdateAllSession" ForeColor="Red" runat="server" Text="Generate For All Sections" />
                                                </span>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                        <div class="row_curved" id="div3" runat="server">
                                            <label>
                                                <asp:Label ID="Label7" Text="Remark" runat="server"></asp:Label></label>
                                            <div class="field">
                                                <span class="indicator">
                                                    <asp:TextBox runat="server" ID="txtDefaultAttRemark" TextMode="MultiLine" Rows="5"
                                                        Columns="50" Width="300" Height="40px" />
                                                </span>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                        <div class="row_curved" id="divGenerateList" runat="server">
                                            <label>
                                                Confirm to proceed?
                                            </label>
                                            <div class="field">
                                                <span class="indicator">
                                                    <asp:Button runat="server" ID="btnGenerateList" OnClientClick="return confirm('Are you sure to generate?');"
                                                        Text="Generate List" OnClick="btnGenerateList_Click" />
                                                    <asp:Button runat="server" ID="btnDeleteList" OnClientClick="return confirm('Are you sure to delete?');"
                                                        Text="Delete List" Visible="false" OnClick="btnDeleteList_Click" />
                                                </span>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:UpdatePanel runat="server" ID="uplStudentList">
                                    <ContentTemplate>
                                        <b>Student List</b><br />
                                        <asp:GridView ID="gvStudentList" runat="server" AutoGenerateColumns="False" CellPadding="4"
                                            DataKeyNames="StudentProfileKey" Width="100%" DataSourceID="sqlDSStudentList"
                                            ForeColor="#333333" GridLines="None" EmptyDataText="<i>No attendance record found. Please generate a attendance list firstly.</i>"
                                            OnSelectedIndexChanged="gvStudentList_SelectedIndexChanged">
                                            <RowStyle BackColor="#EFF3FB" HorizontalAlign="Center" />
                                            <Columns>
                                                <asp:BoundField DataField="StudentProfileKey" HeaderText="StudentProfileKey" SortExpression="StudentProfileKey"
                                                    Visible="false" />
                                                <asp:BoundField DataField="FirstName" HeaderText="FirstName" SortExpression="FirstName" />
                                                <asp:BoundField DataField="LastName" HeaderText="LastName" SortExpression="LastName" />
                                                <asp:BoundField DataField="OtherName" HeaderText="OtherName" SortExpression="OtherName" />
                                                <asp:BoundField DataField="Gender" HeaderText="Gender" SortExpression="Gender" />
                                                <asp:BoundField DataField="AttDesc" HeaderText="Att Desc" SortExpression="AttDesc" />
                                                <asp:BoundField DataField="Remark" HeaderText="Remark" SortExpression="Remark" />
                                                <asp:CommandField ShowSelectButton="true" ButtonType="Button" SelectText="Select" />
                                            </Columns>
                                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                            <EditRowStyle BackColor="#2461BF" />
                                            <AlternatingRowStyle BackColor="White" />
                                        </asp:GridView>
                                        <asp:SqlDataSource ID="sqlDSStudentList" runat="server" ConnectionString="<%$ ConnectionStrings:sis.dbconn %>"
                                            SelectCommand="sprocStudentAttendanceDetailSelectListView" SelectCommandType="StoredProcedure">
                                            <SelectParameters>
                                                <asp:ControlParameter ControlID="lblAttKey" Name="AttKey" PropertyName="Text" Type="Int32" />
                                            </SelectParameters>
                                        </asp:SqlDataSource>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:UpdatePanel runat="server" ID="uplButtons">
                                    <ContentTemplate>
                                        <div class="row_curved" id="divAttType" runat="server">
                                            <label>
                                                Att: Type</label>
                                            <div class="field">
                                                <span class="indicator">
                                                    <asp:DropDownList ID="ddlAttType" runat="server" DataSourceID="sqlDSAttType" DataTextField="Description"
                                                        DataValueField="AttendanceTypeCode" />
                                                    <asp:SqlDataSource ID="sqlDSAttType" runat="server" ConnectionString="<%$ ConnectionStrings:sis.dbconn %>"
                                                        SelectCommand="sprocStudentAttendanceTypeSelectList" SelectCommandType="StoredProcedure">
                                                    </asp:SqlDataSource>
                                                </span>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                        <div class="row_curved" id="divAttRemark" runat="server">
                                            <label>
                                                Remarks</label>
                                            <div class="field">
                                                <span class="indicator">
                                                    <asp:TextBox runat="server" ID="txtAttRemark" TextMode="MultiLine" Width="250px"
                                                        Rows="5" Columns="50" />
                                                </span>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                        <div class="row_curved" style="background-color: #efefef;" id="divButton" runat="server">
                                            <label>
                                                &nbsp;</label>
                                            <div class="field">
                                                <span class="indicator">
                                                    <asp:Button ID="btnSubmit" CssClass="button_normal_submit" Text="Save" ValidationGroup="TimeTable"
                                                        OnClientClick="SubmitOnClientClick(this, 'TimeTable');" runat="server" OnClick="btnSubmit_Click" />
                                                    &nbsp;&nbsp;<asp:Button ID="btnNew" Text="New" runat="server" OnClick="btnNew_Click" />
                                                    &nbsp;&nbsp;<asp:Button ID="btnDelete" Text="Delete" runat="server" OnClick="btnDelete_Click" />
                                                </span>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                        <div class="row_curved" id="divMessage" runat="server">
                                            <label>
                                                &nbsp;</label>
                                            <div class="field">
                                                <span class="indicator">
                                                    <asp:Label ID="lblMessage" Font-Bold="true" runat="server"></asp:Label>
                                                </span>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </div>
        </div>
    </div>

    <script type="text/javascript">
        //<![CDATA[
        SetSumitNormalButtonAttribute(document.getElementById('<%=btnSubmit.ClientID%>'));
        //]]>
    </script>

</asp:Content>
